home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 1
/
Precision Software Applications Silver Collection Volume One (PSM) (1993).iso
/
games
/
egavga
/
dcg303xa.arj
/
HEALER.SCR
< prev
next >
Wrap
Text File
|
1993-06-27
|
5KB
|
215 lines
!
! Default Healer's Script
!
! (c) DC Software, 1992
!
!------------------------------------------------------------------------!
:@TALK ! Talk to the character !
!------------------------------------------------------------------------!
if player.hp = 0 then
writeln( player.name, " is dead!" );
STOP;
endif;
if npc.picture >= 0 then
viewpcx(npc);
endif;
! First, say hello.. !
if NPC.V0 > 0 then
writeln( "Hello ", player.name, ". What brings you back?" );
else
writeln( "Welcome to ", npc.name, ". How may I help you?" );
endif;
! Now, set some variables..
NPC.V0 = 1; ! From know on, remember we've been here
L0 = group.current; ! Current spokesperson !
L4 = npc.value; ! Cost of healing !
L5 = npc.value * 2; ! Cost of Cures !
L6 = npc.value * 5; ! Cost of resurections !
L7 = npc.value / 2 + 1; ! Cost of removing cursed items !
:LOOP
group.current = L0;
L3 = select$( "Heal", L4,
"Cure", L5,
"Resurrect", L6,
"Remove Curse", L7,
"Talk", -1 ! (talking is free)
);
ON L3 GOTO DO_HEAL, DO_CURE, DO_RESTORE, CURSE, CHAT;
:CSTOP
writeln( "'Till we meet again.." );
goto XSTOP;
!
! Heal Wounds..
!
:DO_HEAL
writeln( "Heal who?" );
L3 = select( group );
IF L3 < 0 GOTO LOOP;
if player.hp >= player.mhp then
writeln( player.name, " is not hurt. You waste my time." );
goto LOOP;
endif;
if player.hp = 0 GOTO DEADGUY;
if group.gold < L4 GOTO NOMONEY;
writeln( player.name, " is now healed." );
voice( "OkSpell", 1000 );
dec( group.gold, L4 );
player.hp = player.mhp; ! Reset the hit points to maximum hit points !
goto LOOP;
!
! Cure poisoning...
!
:DO_CURE
writeln( "Cure whom?" );
L3 = select( group );
IF L3 < 0 GOTO LOOP;
if player.hp = 0 GOTO DEADGUY;
if NOT player.poisoned then
writeln( player.name, " is not poisoned. You waste my time." );
goto LOOP;
endif;
if group.gold < L5 GOTO NOMONEY;
writeln( player.name, " is now cured." );
voice( "OkSpell", 1000 );
dec( group.gold, L5 );
player.poisoned = 0;
goto LOOP;
!
! Remove Cursed Item..
!
:CURSE
writeln( "Who has the cursed item?" );
L3 = select( group );
IF L3 < 0 GOTO LOOP;
writeln( "Remove what item?" );
L3 = select( player.body );
if L3 < 0 goto LOOP;
if curritem.cursed then
if group.gold < L6 GOTO NOMONEY;
dec( group.gold, L6 );
writeln( "The ", curritem.type, " has been removed." );
voice( "OkSpell", 1000 );
move( curritem, player );
else
writeln( "The ", curritem.name, " is not cursed." );
endif;
goto LOOP;
!
! or, if you so wish, you can handle each type separately..
!
! on L3 goto :Weapon, :Armor, :Shield, :Ring, :Amulet, :Staff;
! goto LOOP;
! :Weapon move( player.weapon, player ); goto LOOP;
! :Armor move( player.armor , player ); goto LOOP;
! :Shield move( player.shield, player ); goto LOOP;
! :Ring move( player.ring , player ); goto LOOP;
! :Amulet move( player.amulet, player ); goto LOOP;
! :Staff move( player.staff , player ); goto LOOP;
!
! Resurect the dead..
!
:DO_RESTORE
writeln( "Resurrect who?" );
L3 = select( group );
IF L3 < 0 GOTO LOOP;
if player.hp <> 0 then
writeln( player.name, " is not dead. You waste my time." );
goto LOOP;
endif;
if group.gold < L7 GOTO NOMONEY;
voice( "HighWind", 1000 );
writeln( "First, the healer treats the dead body of ", player.name );
writeln( "treating every wound. Then he replaces the blood in the body" );
writeln( "with a clear substance. Finally a resurrection spell brings" );
writeln( "your friend to life." );
voice( "Thunder", 1000 );
voice( "WakeCall", 1000 );
player.poisoned = 0;
player.hp = player.mhp;
dec( group.gold, L7 );
goto LOOP;
:DEADGUY
voice( "Dead" );
writeln( "Dr McCoy: He's dead Jim.." );
goto LOOP;
:NOMONEY
voice( "Broke" );
writeln( "Sorry, you can't afford it." );
goto LOOP;
!
! Handle conversation..
!
:CHAT
writeln( "What would you like to talk about?" );
:CHAT1
L3 = getstr("Name","Heal","Cure","Resurrec","Remove","Curse","Join","Bye");
if L3 = -1 then
writeln( "Ok." );
goto LOOP; ! Pressed ESCape !
endif;
! First, see if the keyword typed is in the character's text block !
if dotext( S0 ) then
if L3 = 7 goto XSTOP;
goto CHAT1;
endif;
! It didn't, so try the predefined ones..
on L3 goto CName, DO_HEAL, DO_CURE, DO_RESTORE, CURSE, CURSE, JOINP, CSTOP;
! Nope, try a 'DEFAULT' line
if not dotext( "DEFAULT" ) then
writeln( "I don't know anything about that!" );
endif;
goto CHAT1;
:CName
writeln( "My name is ", npc.name, "." );
goto CHAT1;
:JOINP
writeln( "Sorry. I'm dedicated to my patients.." );
goto CHAT1;
!-----------------------------------------------------------------!
! All STOPs now lead here so the screen can be restored if needed !
!-----------------------------------------------------------------!
:XSTOP
if npc.picture >= 0 then
paint(window); ! Assumes the picture fits in the window !
endif;
STOP;